package cn.lhq.controller.activity;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.lhq.bean.CreateActivityForm;
import cn.lhq.bean.VoteResult;
import cn.lhq.service.ActivityService;

@RequestMapping(value="/activity")
@Controller
public class CreateActivityController {

	@Resource
	private ActivityService activityService;
	
	@RequestMapping(value="/createActivity.do")
	@ResponseBody
	public VoteResult execute(CreateActivityForm form){
		
		VoteResult result = null;
		try {
			result = activityService.createActivity(form);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}
	
}